using UnityEngine;

public class SceneGame_ZigZag : MonoBehaviour
{
	
	public float Velocity;
	
	public void Update()
	{
		rigidbody.velocity = new Vector3(Velocity, 0.0f, 0.0f);
	}
	
	public void OnTriggerEnter(Collider collider)
	{
		if (collider.name == "Wall")
			Velocity *= -1;
	}
	
}